#pragma once

#pragma once

#include"../net/campus_whole_server.h"

//修改用户信息
const std::string SIGNAL_TYPE_PERSON_INFO_MODIFY = "person_info_modify";
const std::string SIGNAL_TYPE_RESP_PERSON_INFO_MODIFY = "resp_person_info_modify";

//获取用户信息
const std::string SIGNAL_TYPE_PERSON_INFO = "person_info";
const std::string SIGNAL_TYPE_RESP_PERSON_INFO = "person_info_resp";

enum CampusPersonInfoSqlType {
    PERSON_INFO_SQL_SELECT,  // 查询用户个人信息

    PERSON_INFO_MODIFY_SQL_SELECT, // 修改用户个人信息查询
    PERSON_INFO_MODIFY_SQL_UPDATE, // 修改用户个人信息更新
    PERSON_INFO_MODIFY_SQL_INSERT, // 修改用户个人信息插入
};

enum CampusPersonInfoRet {
    PERSON_INFO_SUCESS,
    PERSON_INFO_NOT_EXISTS,

    PERSON_INFO_MODIFY_SUCESS
};

struct CampusPersonInfo : public CampusSqlInfo 
{
    CampusPersonInfoSqlType type;          // SQL操作类型

    std::string uid;
    std::string name;
    std::string class_;
    std::string college;
    std::string gender;
    std::string major;
    std::string identity;

    virtual void dummpy_func() {} 
};

struct CampusPersonInfoObserver
{
    virtual void handlePersonInfo(websocketpp::connection_hdl hdl, json const JMsg) {};
    virtual void handlePersonInfoModify(websocketpp::connection_hdl hdl, json const JMsg) {};
};